<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>手机管理</title>
  </head>
  <body>
    <h2>手机管理</h2>
    <table width="100%" border="1">
        <tr>
            <th>
                编号
            </th>
            <th>
                名称
            </th>
            <th>
                价格
            </th>
            <th>
                操作
            </th>
        </tr>
        <% for(let i=0;i<phones.length;i++){%>
            <tr>
                <td>
                    <%=phones[i].id %>
                </td>
                <td>
                    <%=phones[i].name %>
                </td>
                <td>
                    <%=phones[i].price %>
                </td>
                <td>
                    <a href="/pdt/delete/<%=phones[i].id %>">删除</a> | 
                    <a href="/pdt/edit/<%=phones[i].id %>">编辑</a>
                </td>
            </tr>
        <%}%>
    </table>
    <h3>
        <%=msg %>
    </h3>
  </body>
</html>
